<?php

include ("QueryBD.php");

$link = mysql_connect('localhost','root','');
$conect = mysql_select_db("escrutinio", $link);
if($conect == NULL){

	echo "ERROR EN LA CONEXION";

}

$query = 'insert into provincialesdetalle(Circuito,Mesa,Agrupacion,Escuela,Interna,GovLista,GovAg,LegLista,LegAg,IntendenteLista,IntendenteAg) values 
	     ('.$_POST['circuito'].','.$_POST['mesa'].',47,21,"ELEGI FUTURO",'.$_POST['11'].','.$_POST['12'].','.$_POST['13'].','.$_POST['14'].','.$_POST['15'].','.$_POST['16'].'),
		 ('.$_POST['circuito'].','.$_POST['mesa'].',131,21,"LISTA 2 CELESTE Y BLANCA K",'.$_POST['21'].',0,'.$_POST['23'].',0,0,0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 678 ISHII GOBERNADOR",'.$_POST['31'].','.$_POST['22'].','.$_POST['33'].','.$_POST['24'].',0,0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 2 CELESTE Y BLANCA K",0,0,0,0,'.$_POST['25'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 4 CELESTE Y BLANCA K",0,0,0,0,'.$_POST['35'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 5 CELESTE Y BLANCA K",'.$_POST['11'].',0,0,0,0,'.$_POST['45'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 7 CELESTE Y BLANCA K",0,0,0,0,'.$_POST['55'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 678 ISHII GOBERNADOR",0,0,0,0,'.$_POST['65'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',131,"PAD","LISTA 679 ISHII GOBERNADOR",0,0,0,0,'.$_POST['75'].','.$_POST['26'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',1603,"PAD","BLANCA Y CELESTE",0,0,0,0,'.$_POST['85'].','.$_POST['36'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',1600,"PAD","DEMOCRACIA Y EQUIDAD",'.$_POST['41'].','.$_POST['32'].','.$_POST['43'].','.$_POST['34'].','.$_POST['95'].','.$_POST['46'].'), 
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","",'.$_POST['51'].','.$_POST['42'].',0,0,0,0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","LISTA A",0,0,'.$_POST['53'].',0,0,0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","ELEGI V",0,0,'.$_POST['63'].','.$_POST['44'].',0,0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","ELEGI A",0,0,0,0,'.$_POST['105'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","lISTA B",0,0,0,0,'.$_POST['115'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","LISTA C",0,0,0,0,'.$_POST['125'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","LISTA D",0,0,0,0,'.$_POST['135'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","LISTA E",0,0,0,0,'.$_POST['145'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',132,"PAD","LISTA F",0,0,0,0,'.$_POST['155'].','.$_POST['56'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',133,"PAD","ES POSIBLE BUENOS AIRES",'.$_POST['61'].','.$_POST['52'].','.$_POST['73'].','.$_POST['54'].','.$_POST['165'].','.$_POST['66'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',134,"PAD","COMIENZA EL CAMBIO",'.$_POST['71'].','.$_POST['62'].','.$_POST['83'].','.$_POST['64'].','.$_POST['175'].','.$_POST['76'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',135,"PAD","",'.$_POST['81'].','.$_POST['72'].','.$_POST['93'].','.$_POST['74'].','.$_POST['185'].','.$_POST['86'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',136,"PAD","",'.$_POST['91'].','.$_POST['82'].','.$_POST['103'].','.$_POST['84'].','.$_POST['195'].','.$_POST['96'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',137,"PAD","LISTA CELESTE",'.$_POST['101'].','.$_POST['92'].','.$_POST['113'].','.$_POST['94'].','.$_POST['205'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',137,"PAD","LISTA CELESTE",0,0,0,0,'.$_POST['215'].',0),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',137,"PAD","LISTA BLANCA",0,0,0,0,'.$_POST['225'].','.$_POST['106'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',64,"PAD","",0,0,0,0,'.$_POST['235'].','.$_POST['116'].'),
		 (	'.$_POST['circuito'].','.$_POST['mesa'].',655,"PAD","",0,0,0,0,'.$_POST['245'].','.$_POST['126'].')';
		 
		 
$result = mysql_query($query,$link);

//$resultado = $DescriptorBD->query("insert into provincialesdetalle(Circuito,Mesa,Agrupacion,Escuela,Interna,GovLista,GovAg,LegLista,LegAg,IntendenteLista,IntendenteAg) values ( 1,24,47,'PAD','ELEGI FUTURO',34,43,54,43,32,2)","escrutinio");

if($resut==NULL){

	echo "ERROR EN INSERT";
}
mysql_close();
